{% extends "lbforum/base.html" %}

{% load i18n %}

{% block content %}
    <!-- brd-wrap begins -->
<div id="brd-wrap" class="brd">

    <!-- brd-index begins -->
<div id="brd-index" class="brd-page basic-page">
    {% include 'lbforum/inc_header.html' %}
    {% include 'lbforum/inc_announce.html' %}
    <p></p>
    <div class="hr"><hr /></div>
    <!-- brd-main begins -->
<div id="brd-main">
    <div class="main-head">
        <h1 class="hn"><span>{{ LBFORUM_TITLE }}</span></h1>
    </div>
    {% for category in categories %}
        <div class="main-subhead">
            <h2 class="hn"><span>{{ category }}</span></h2>
            <p class="item-summary"> 
                <span>
                    <strong class="info-topics">{% trans "Topics" %}</strong>,
                    <strong class="info-posts">{% trans "Posts" %}</strong>, 
                    <strong class="info-lastpost">{% trans "last post" %}</strong>
                </span> 
            </p>
        </div>
        <div class="main-content main-category">
            {% for forum in category.lst_forum%}
                <!-- forum begins -->
                
<div id="forum" class="main-item {% cycle 'odd' 'even' %} {% if forloop.first %}main-item1{% endif %}">
    <span class="icon "><!-- --></span>

    <div class="item-subject">
        <h3 class="hn"><a href="{% url lbforum_forum forum.slug %}"><span> {{forum}} </span></a></h3>
        <p>{{ forum.description }}</p>
    </div>

    <ul class="item-info">
        <li class="info-topics">
            <strong>{{ forum.num_topics }} </strong> <span class="label">{% trans "topics"%}</span>
        </li>
        <li class="info-posts">
            <strong>{{ forum.num_posts }} </strong> <span class="label">{% trans "posts"%}</span>
        </li>
        <li class="info-lastpost">
            <span class="label">{% trans "Last post"%}:</span>
            <strong>{{ forum.get_last_post.update|timesince }}</strong> 
            <cite>by {{ forum.get_last_post.posted_by.username }}</cite>
        </li>
    </ul>
</div>
<!-- forum ends -->
    {% endfor %}
</div>
<!-- forum-#id ends -->
{% endfor %}
</div>
<!-- brd-main ends -->

<!-- forum_qpost -->

<!-- brd-stats begins -->
<div id="brd-stats" class="gen-content">
    <h2 class="hn"><span>{% trans "Forum statistics" %}</span></h2>
    <ul>
        <li class="st-users">
            <span>{% trans "Total number of registered users" %}: <strong>{{ total_users }} </strong></span>
        </li>
        <li class="st-users">
            <span>{% trans "Newest registered user" %}: 
                <strong>
                    <a href="{% url user_profile last_registered_user.pk %}">
                        {{ last_registered_user.username }}
                    </a>
                </strong>
            </span>
        </li>
        <li class="st-activity">
            <span>{% trans "Total number of topics" %}: <strong>{{ total_topics }}</strong></span>
        </li>
        <li class="st-activity">
            <span>{% trans "Total number of posts" %}: <strong> {{ total_posts }} </strong></span>
        </li>
    </ul>
</div>
<!-- brd-stats ends -->
<!--  
<div class="gen-content" id="brd-online">
    <h3 class="hn">
		<span>{% trans "Currently online" %}<strong> {{ total_onlines }} </strong> ( <strong> {{ total_onlines_guest }} </strong> {% trans "guests" %}, <strong>{{ total_onlines_user }}</strong> 
		{ % trans "registered" % }注册{% trans "user" %} )</span>
	</h3>
    <p>
        {% for o in online_users %} <a href="{% url user_profile o.user_id %}">{{o.username}}</a> {% endfor %}
	</p>
</div>
-->
<div class="gen-content" id="brd-friend-links">
		<span>{% trans "Friend Links" %}</span> {% include 'lbforum/inc_friend_links.html' %}
</div>

<div class="hr"><hr /></div>

{% include 'lbforum/inc_copyright.html' %}

</div><!-- brd-index ends -->
</div><!-- brd-wrap ends -->

{% endblock %}
